<template>
  <div class="basic-body">
    <CommonHead :height="headHeight[index]" :EndSetNum="EndSetNum" :index="index" >
      <template #search>
        搜索课程或团队
      </template>
      <template #menu-1><div @click="clickMenu(1)">首页</div></template>
      <template #menu-2><div @click="clickMenu(2)">课程广场</div></template>
      <template #menu-3><div @click="clickMenu(3)">论坛</div></template>
      <template #menu-4><div @click="clickMenu(4)">团队风采</div></template>
      <template #menu-5><div @click="clickMenu(5)">关于我们</div></template>
      <template #signbtn>
        <div @click="clickLogin">登录</div>
      </template>
      <template #head-btn-1>
        <div @click="gotoStuCourses">开始学习</div>
      </template>
      <template #head-btn-2>
        <div @click="gotoStuForum">探索</div>
      </template>
    </CommonHead>
    <router-view @gotoStuCourses="gotoStuCourses"></router-view>
<!--    页面底部-->
    <CommonTail :EndSetNum="EndSetNum"></CommonTail>
  </div>
</template>
<script>
import CommonHead from "@/components/layout/CommonHead";
import CommonTail from "@/components/layout/CommonTail";
export default {
  name:"StuHomePage",
  components:{CommonHead,CommonTail},
  created() {
  },
  mounted() {
  },
  prop:{

  },
  data(){
    return{
      EndSetNum:1,//0-团队端，1-学生端
      index:1,
      headHeight: [
          '',
        '1111px',//首页
          '',
        '841px',//论坛
        '85px',//团队，
          ''
      ],
    }
  },
  computed:{

  },
  watch:{

  },
  methods:{
    clickMenu(i){
      this.index=i;
      switch (i){
        case 1:this.$router.push('/s');break;
        case 2:this.$router.push('/s/courses');break;
        case 3:this.$router.push('/s/forum');break;
        case 4:this.$router.push('/s/teams');break;
        case 5:this.$router.push('/s/aboutus');break;
      }

    },
    gotoStuCourses(){
      this.index=2;
      this.$router.push('/s/courses');
    },
    gotoStuForum(){
      this.index=3;
      this.$router.push('/s/forum');
    },
    clickLogin(){
      this.$router.push('/login')
    }

  }
}
</script>

<style scoped>
.basic-body{
  width: 1728px;
  margin:0 auto;
  overflow: hidden;
}

</style>